home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 6991 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.1 KB

  1. Path: news.jf.intel.com!news
  2. From: Cero Kelvin <Rodney_Korn@ccm.jf.intel.com>
  3. Newsgroups: comp.lang.c,comp.lang.c++,comp.os.ms-windows.programmer.misc,comp.os.msdos.programmer,comp.programming,comp.windows.ms.programmer
  4. Subject: Re: How to access miliseconds?
  5. Date: Tue, 20 Feb 1996 09:28:10 -0800
  6. Organization: None
  7. Message-ID: <312A04AA.1E15@ccm.jf.intel.com>
  8. References: <4fqh79$j4j@usenet.rpi.edu> <3121E861.3EA8@tid.es> <31232CFA.6007@lure.u-psud.fr>
  9. NNTP-Posting-Host: rkorn.jf.intel.com
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 2.0 (Win95; I)
  14.  
  15. You need to use the Windows Multimedia timer services (MMTIMER) API.  
  16. They are documented in the SDK:
  17.  
  18. MMRESULT timeSetEvent(UINT uDelay, UINT uResolution, 
  19.     LPTIMECALLBACK lpTimeProc, DWORD dwUser, UINT fuEvent);
  20.  
  21. MMRESULT timeKillEvent(UINT uTimerID);
  22.  
  23. void CALLBACK TimeProc(UINT uID, UINT uMsg, DWORD dwUser, DWORD dw1,
  24.     DWORD dw2);
  25.  
  26.  
  27. These will give you the 1ms timer callbacks.  Read the docs carefully on 
  28. these functions because misuse of them can cause system lockups.
  29.